function showSingleSponsorshipInfo($clsRpt, $strTitle, $clsSpon)
{
    //---------------------------------------------------------------------
    // use for single sponsorship
    //---------------------------------------------------------------------
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'ssponDiv';
    $attributes->divImageID = 'ssponDivImg';
    openBlock($strTitle, '', $attributes);
    $clsRpt->openReport();
    if ($clsSpon->lNumSponsors == 0) {
        echoT('<i>(no sponsorships)</i><br>');
    } else {
        foreach ($clsSpon->sponInfo as $idx => $spon) {
            echoT($clsRpt->openRow() . $clsRpt->writeLabel('Sponsor ID:') . $clsRpt->writeCell(strLinkView_Sponsorship($spon->lKeyID, 'view sponsorship', true) . ' ' . str_pad($spon->lKeyID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow());
            $lFID = $spon->lForeignID;
            if ($spon->bSponBiz) {
                $strLinkFID = strLinkView_Biz($lFID, 'View business record', true);
            } else {
                $strLinkFID = strLinkView_PeopleRecord($lFID, 'View people record', true);
            }
            echoT($clsRpt->openRow() . $clsRpt->writeLabel('Sponsor:') . $clsRpt->writeCell($strLinkFID . ' ' . str_pad($lFID, 5, '0', STR_PAD_LEFT) . ' ' . $spon->strSponSafeNameFL) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Sponsorship Program:') . $clsRpt->writeCell(htmlspecialchars($spon->strSponProgram)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Client:'));
            if (is_null($spon->lClientID)) {
                echoT($clsRpt->writeCell('<i>Client not set</i>'));
            } else {
                echoT($clsRpt->writeCell(strLinkView_Client($spon->lClientID, 'View client record', true) . ' ' . $spon->strClientSafeNameFL . ' (' . htmlspecialchars($spon->strLocation) . ')'));
            }
            echoT($clsRpt->closeRow());
        }
    }
    echoT($clsRpt->closeReport());
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}
 public function sponsorChargeHTMLSummary()
 {
     //-----------------------------------------------------------------------
     // assumes user has called $clsSCP->loadChargeRecord()
     //-----------------------------------------------------------------------
     global $gdteNow, $genumDateFormat;
     $params = array('enumStyle' => 'terse');
     $clsRpt = new generic_rpt($params);
     $clsRpt->setBreadCrumbs();
     $cRec = $this->chargeRec;
     $bBiz = $cRec->bBiz;
     if ($bBiz) {
         $strLinkPeopleBiz = strLinkView_Biz($cRec->lForeignID, 'View business record', true);
     } else {
         $strLinkPeopleBiz = strLinkView_People($cRec->lForeignID, 'View people record', true);
     }
     $lSponID = $cRec->lSponsorshipID;
     $clsRpt->openReport('', '');
     $clsRpt->openRow(false);
     $clsRpt->writeLabel(' Sponsor:');
     $clsRpt->writeCell($strLinkPeopleBiz . ' ' . str_pad($cRec->lForeignID, 5, '0', STR_PAD_LEFT) . ' ' . $cRec->strSponSafeNameFL);
     $clsRpt->closeRow();
     $clsRpt->openRow(false);
     $clsRpt->writeLabel('Sponsor ID:');
     $clsRpt->writeCell(strLinkView_Sponsorship($lSponID, 'View sponsorship', true) . ' ' . str_pad($lSponID, 5, '0', STR_PAD_LEFT));
     $clsRpt->closeRow();
     if (is_null($cRec->lClientID)) {
         $strClient = '<i>not set</i>';
     } else {
         $strClient = strLinkView_Client($cRec->lClientID, 'View client record', true) . ' ' . str_pad($cRec->lClientID, 5, '0', STR_PAD_LEFT) . ' ' . $cRec->strClientSafeNameFL;
     }
     $clsRpt->openRow(false);
     $clsRpt->writeLabel('Client:');
     $clsRpt->writeCell($strClient);
     $clsRpt->closeRow();
     $clsRpt->openRow(false);
     $clsRpt->writeLabel('Status:');
     $clsRpt->writeCell($cRec->bInactive ? 'Inactive' : 'Active');
     $clsRpt->closeRow();
     $clsRpt->openRow(false);
     $clsRpt->writeLabel('Charge ID:');
     $clsRpt->writeCell(str_pad($cRec->lKeyID, 5, '0', STR_PAD_LEFT));
     $clsRpt->closeRow();
     $clsRpt->openRow(false);
     $clsRpt->writeLabel('Amount:');
     $clsRpt->writeCell($cRec->strCurSymbol . ' ' . number_format($cRec->curChargeAmnt, 2) . ' ' . $cRec->strFlagImage);
     $clsRpt->closeRow();
     $clsRpt->openRow(false);
     $clsRpt->writeLabel('Date of Charge:');
     $clsRpt->writeCell(date($genumDateFormat, $cRec->dteCharge));
     $clsRpt->closeRow();
     $clsRpt->closeReport(true);
 }
function showSponHonInfo(&$clsRpt, $lSponID, &$sponRec, $bInactive)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    if ($bInactive) {
        $strLink = '';
    } else {
        if ($sponRec->bHonoree) {
            $strLink = strLinkRem_SponsorHonoree($lSponID, 'Remove honoree', true, true) . '&nbsp;' . strLinkRem_SponsorHonoree($lSponID, 'Remove honoree', false, true);
        } else {
            $strLink = strLinkAdd_SponHonoree($lSponID, 'Add sponsorship honoree', true) . '&nbsp;' . strLinkAdd_SponHonoree($lSponID, 'Add sponsorship honoree', false);
        }
    }
    $attributes = new stdClass();
    $attributes->lTableWidth = 900;
    $attributes->divID = 'sponHon';
    $attributes->divImageID = 'sponHonDivImg';
    openBlock('Honoree Info', $strLink, $attributes);
    if ($sponRec->bHonoree) {
        $lHonFID = $sponRec->lHonoreeID;
        if ($sponRec->bHonBiz) {
            $strLinkHon = strLinkView_Biz($lHonFID, 'View business record', true);
        } else {
            $strLinkHon = strLinkView_PeopleRecord($lHonFID, 'View people record', true);
        }
        echoT($clsRpt->openReport());
        echoT($clsRpt->openRow() . $clsRpt->writeLabel('Honoree:') . $clsRpt->writeCell($strLinkHon . $sponRec->strHonSafeNameFL) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell(strBuildAddress($sponRec->strHonAddr1, $sponRec->strHonAddr2, $sponRec->strHonCity, $sponRec->strHonState, $sponRec->strHonCountry, $sponRec->strHonZip, true)) . $clsRpt->closeRow());
        echoT($clsRpt->closeReport(''));
    } else {
        echoT('<i>There is no honoree associated with this sponsorship</i>');
    }
    $attributes = new stdClass();
    $attributes->bCloseDiv = true;
    closeBlock($attributes);
}