public function lSponCampID() { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $clsAC = new maccts_camps(); return $clsAC->lCampIDViaCampName($clsAC->lAcctIDViaAcctName('Sponsorship'), 'Sponsorship Payment'); }
private function strReportTitle(&$sRpt) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $strOut = ''; $strLIStyle = 'margin-left: 20pt; line-height:12pt;'; switch ($sRpt->rptName) { case CENUM_REPORTNAME_GIFTTIMEFRAME: $strOut .= '<b>Donation Timeframe Report</b> <ul style="list-style-type: square; display:inline; margin-left: 0; padding: 0pt;">'; break; case CENUM_REPORTNAME_GIFTYEAREND: $strOut .= '<b>Donation Year-end Report</b> <ul style="list-style-type: square; display:inline; margin-left: 0; padding: 0pt;">'; break; case CENUM_REPORTNAME_GIFTACCOUNT: $cAcct = new maccts_camps(); $cAcct->loadAccounts(true, true, $sRpt->acctIDs); $strOut .= '<b>Donation Account Report</b> <ul style="list-style-type: square; display:inline; margin-left: 0; padding: 0pt;"> <li style="' . $strLIStyle . '"><b>Selected Accounts:</b> <ul style="display:inline; margin-left: 0; padding: 0pt;">'; foreach ($cAcct->accounts as $acct) { $strOut .= '<li style="' . $strLIStyle . '">' . $acct->strSafeName . '</li>' . "\n"; } $strOut .= '</ul></li>'; break; case CENUM_REPORTNAME_GIFTCAMP: $cCamp = new maccts_camps(); $cCamp->loadCampaigns(false, false, null, true, $sRpt->campIDs); $strOut = '<b>Donation Campaign Report</b> <ul style="list-style-type: square; display:inline; margin-left: 0; padding: 0pt;"> <li style="' . $strLIStyle . '"><b>Selected Campaigns:</b> <ul style="display:inline; margin-left: 0; padding: 0pt;">'; foreach ($cCamp->campaigns as $camp) { $strOut .= '<li style="' . $strLIStyle . '">' . $camp->strAcctSafeName . ': ' . $camp->strSafeName . '</li>' . "\n"; } $strOut .= '</ul></li>'; break; case CENUM_REPORTNAME_GIFTAGG: $strOut .= '<b>Donation Aggregate Report</b> <ul style="list-style-type: square; display:inline; margin-left: 0; padding: 0pt;">'; break; default: screamForHelp($sRpt->rptName . ': invalid report type<br>error on line <b> -- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } if (isset($sRpt->strDateRange)) { $strOut .= '<li style="' . $strLIStyle . '"><b>Date range:</b> ' . $sRpt->strDateRange . '</li>'; /* $strOut .= '<li style="'.$strLIStyle.'"><b>Date range:</b> ' .date($genumDateFormat, $sRpt->dteStart).' - ' .date($genumDateFormat, $sRpt->dteEnd).' </li>'; */ } if (isset($sRpt->curMin)) { $strOut .= '<li style="' . $strLIStyle . ' "><b>Gift range:</b> ' . number_format($sRpt->curMin, 2) . ' - ' . number_format($sRpt->curMax, 2) . ' </li>' . "\n"; } if (isset($sRpt->lACO)) { $strOut .= '<li style="' . $strLIStyle . ' "><b>Accounting Country:</b> '; if ($sRpt->lACO <= 0) { $strOut .= 'All countries</li>'; } else { $cACO = new madmin_aco(); $cACO->loadCountries(false, false, true, $sRpt->lACO); $strOut .= $cACO->countries[0]->strName . ' ' . $cACO->countries[0]->strFlagImg . '</li>'; } } if (isset($sRpt->enumInc)) { $strOut .= '<li style="' . $strLIStyle . ' "><b>Included Donations: </b>'; switch ($sRpt->enumInc) { case 'all': $strOut .= 'All donations</li>' . "\n"; break; case 'gift': $strOut .= 'Gifts only (no sponsorship payments)</li>' . "\n"; break; case 'spon': $strOut .= 'Only sponsorship payments</li>' . "\n"; break; default: screamForHelp($sRpt->enumInc . ': invalid include type<br>error on line <b> -- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } } if (isset($sRpt->lYear)) { $strOut .= '<li style="' . $strLIStyle . ' "><b>Year: </b>' . $sRpt->lYear . '</li>' . "\n"; } if (isset($sRpt->bAggregateDonor)) { $strOut .= '<li style="' . $strLIStyle . ' "><b>Grouping: </b>' . ($sRpt->bAggregateDonor ? 'By Donor' : 'Individual Donations') . '</li>' . "\n"; } $strOut .= '</ul><br>' . "\n"; return $strOut; }