<td class="enpRptLabel"> Campaign </td> </tr>'); foreach ($gifts as $gift) { $lGiftID = $gift->gi_lKeyID; $lDonorID = $gift->gi_lForeignID; $bBizGift = $gift->pe_bBiz; if ($bBizGift) { $strLinkDonor = strLinkView_BizRecord($lDonorID, 'View business record', true); } else { $strLinkDonor = strLinkView_PeopleRecord($lDonorID, 'View people record', true); } echoT(' <tr class="makeStripe"> <td class="enpRpt">' . strLinkView_GiftsRecord($lGiftID, 'View gift record', true) . ' ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt">' . $strLinkDonor . ' ' . str_pad($lDonorID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt">' . htmlspecialchars($gift->strImportID) . ' </td> <td class="enpRpt">' . $gift->strSafeNameLF . ' </td> <td class="enpRpt" style="text-align: right;">' . $gift->strFormattedAmnt . ' </td> <td class="enpRpt" style="text-align: center;">' . date($genumDateFormat, $gift->gi_dteDonation) . ' </td> <td class="enpRpt">' . htmlspecialchars($gift->ga_strAccount) . ' </td> <td class="enpRpt">' . htmlspecialchars($gift->gc_strCampaign) . ' </td>
private function giftNotesSearch(&$results) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $results->strLabel = 'Gift notes'; $results->lNumResults = 0; $cACO = new madmin_aco(); $sqlStr = 'SELECT gi_lKeyID, gi_lForeignID, gi_curAmnt, gi_lACOID, gi_dteDonation, gi_strNotes, pe_strLName, pe_strFName, pe_bBiz, gi_lSponsorID FROM gifts INNER JOIN people_names ON pe_lKeyID=gi_lForeignID WHERE NOT gi_bRetired AND NOT pe_bRetired AND ' . $this->textSearchWhere('gi_strNotes') . ' ORDER BY pe_strLName, pe_strFName, gi_lKeyID;'; $query = $this->db->query($sqlStr); $results->lNumResults = $lNumRows = $query->num_rows(); if ($lNumRows > 0) { $idx = 0; $results->matches = array(); foreach ($query->result() as $row) { $results->matches[$idx] = new stdClass(); $match =& $results->matches[$idx]; $lGiftID = $row->gi_lKeyID; $lFID = $row->gi_lForeignID; $strFID = str_pad($lFID, 5, '0', STR_PAD_LEFT); $bBiz = $row->pe_bBiz; $lACOID = $row->gi_lACOID; $bSponPay = !is_null($row->gi_lSponsorID); $cACO->loadCountries(false, false, true, $lACOID); $giftACO =& $cACO->countries[0]; if ($bSponPay) { $match->links = 'Sponsor Payment ID ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . strLinkView_SponsorPayment($lGiftID, 'View payment record', true) . ' '; } else { $match->links = 'Gift ID ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . strLinkView_GiftsRecord($lGiftID, 'View gift record', true) . ' '; } $match->searchInfo = 'Donation record of ' . $giftACO->strCurrencySymbol . ' ' . number_format($row->gi_curAmnt, 2) . ' ' . $giftACO->strFlagImg . ' of ' . date($genumDateFormat, dteMySQLDate2Unix($row->gi_dteDonation)) . ' by '; if ($bBiz) { $match->links .= 'Business ID: ' . $strFID . strLinkView_BizRecord($lFID, 'View business record', true); $match->searchInfo .= htmlspecialchars($row->pe_strLName); } else { $match->links .= 'People ID: ' . $strFID . strLinkView_PeopleRecord($lFID, 'View people record', true); $match->searchInfo .= htmlspecialchars($row->pe_strFName . ' ' . $row->pe_strLName); } $match->text = $row->gi_strNotes; $match->textHighlighted = $this->highlightMatchedText($row->gi_strNotes); ++$idx; } } }
function showBidAssignment(&$clsRpt, &$package, &$auction, &$pbInfo, $lPackageID) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; openBlock('Bid Assignment', ''); echoT($clsRpt->openReport()); $lBidWinnerID = $package->lBidWinnerID; $lGiftID = $package->lGiftID; $bAssigned = !is_null($lBidWinnerID); $bFulfilled = !is_null($lGiftID); if ($bAssigned) { // winning bidder echoT($clsRpt->openRow() . $clsRpt->writeLabel('Package Winner:', '', 'vertical-align: bottom;') . $clsRpt->writeCell($pbInfo->strSafeNameFL . ' ' . $pbInfo->strLink) . $clsRpt->closeRow()); // winning bid amount if ($bFulfilled) { $strEditWin = ''; } else { $strEditWin = strLinkEdit_AuctionWinnngBid($lPackageID, $lBidWinnerID, 'Edit winning bid', true); } echoT($clsRpt->openRow() . $clsRpt->writeLabel('Winning Bid:', '', 'vertical-align: bottom;') . $clsRpt->writeCell($auction->strCurrencySymbol . ' ' . number_format($package->curWinBidAmnt, 2) . ' ' . $strEditWin . ' ' . strLinkRem_AuctionWinningBid($lPackageID, 'Remove this winning bid (and fulfillment)', true, true), '', ' vertical-align: bottom; ') . $clsRpt->closeRow()); // fulfillment if ($bFulfilled) { echoT($clsRpt->openRow() . $clsRpt->writeLabel('Fulfilled?:', '', 'vertical-align: bottom;') . $clsRpt->writeCell('Yes: giftID ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_GiftsRecord($lGiftID, 'View gift record', true) . ' ' . strLinkRem_AuctionFulfillment($lPackageID, 'Remove fulfillment', true, true), '', ' vertical-align: bottom; ') . $clsRpt->closeRow()); } else { echoT($clsRpt->openRow() . $clsRpt->writeLabel('Fulfilled?:', '', 'vertical-align: bottom;') . $clsRpt->writeCell('No ' . strLink_SetPackageFulfill($lPackageID, 'Fulfill/complete this bid', true), '', ' vertical-align: bottom; ') . $clsRpt->closeRow()); } } else { echoT($clsRpt->openRow() . $clsRpt->writeLabel('Package Winner:', '', 'vertical-align: bottom;') . $clsRpt->writeCell('<i>Not assigned</i> ' . strLink_SetPackageWinner($lPackageID, 'Add a bid winner', true) . ' ' . strLink_SetPackageWinner($lPackageID, 'Add a bid winner', false) . ' ') . $clsRpt->closeRow()); } echoT($clsRpt->closeReport()); closeBlock(); }
function strDisplayValueViaType($vVal, $enumType, $lTableID, $bAsTableRow, $lWidth = 0, $strClass = 'enpRpt', $strStyleExtra = '') { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $gbDateFormatUS; $strAlign = 'left'; switch ($enumType) { case CS_FT_HEADING: $strOut = $vVal; break; case CS_FT_LOG: $strOut = $vVal; break; case CS_FT_CHECKBOX: $strOut = $vVal ? 'Yes' : 'No'; break; case CS_FT_DATE: $strAlign = 'center'; if ($vVal . '' == '') { $strOut = ' '; } else { $strOut = strNumericDateViaMysqlDate($vVal, $gbDateFormatUS); } break; case CS_FT_DDL: case CS_FT_DDL_SPECIAL: case CS_FT_DDLMULTI: case CS_FT_TEXT80: case CS_FT_TEXT255: case CS_FT_TEXT20: $strOut = htmlspecialchars($vVal); break; case CS_FT_TEXT: case CS_FT_TEXTLONG: $strOut = nl2br(htmlspecialchars($vVal)); break; case CS_FT_ID: $strAlign = 'center'; $strOut = str_pad($vVal, 5, '0', STR_PAD_LEFT); switch ($lTableID) { case CL_STID_CLIENT: $strOut .= ' ' . strLinkView_ClientRecord($vVal, 'View client record', true); break; case CL_STID_GIFTS: $strOut .= ' ' . strLinkView_GiftsRecord($vVal, 'View gift record', true); break; case CL_STID_PEOPLEBIZ: break; case CL_STID_PEOPLE: $strOut .= ' ' . strLinkView_PeopleRecord($vVal, 'View people record', true); break; case CL_STID_BIZ: $strOut .= ' ' . strLinkView_BizRecord($vVal, 'View business/organization record', true); break; } break; case CS_FT_INTEGER: $strAlign = 'right'; if ($vVal . '' == '') { $strOut = ' '; } else { $strOut = number_format($vVal, 0); } break; case CS_FT_CURRENCY: $strAlign = 'right'; if ($vVal . '' == '') { $strOut = ' '; } else { $strOut = number_format($vVal, 2); } break; default: screamForHelp($enumType . ': unexpected field type<br>error on line <b> -- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } if ($bAsTableRow) { if ($lWidth > 0) { $strStyle = ' style="width: ' . $lWidth . 'pt; ' . $strStyleExtra . ' text-align: ' . $strAlign . ';" '; } else { $strStyle = ' style="' . $strStyleExtra . ' text-align: ' . $strAlign . ';" '; } $strOut = '<td class="' . $strClass . '" ' . $strStyle . '>' . $strOut . '</td>'; } return $strOut; }
function writeGiftHistoryRow($idx, $lPID, $clsGH, &$curTotal) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; $lGiftID = $clsGH->gi_lKeyID; $lDonorID = $clsGH->gi_lForeignID; $lSponsorID = $clsGH->gi_lSponsorID; $bSoft = $lDonorID != $lPID; $bBiz = $clsGH->pe_bBiz; if ($bSoft) { if ($bBiz) { $strLink = strLinkView_BizRecord($lDonorID, 'View business record ' . str_pad($lDonorID, 5, '0', STR_PAD_LEFT), true) . ' '; } else { $strLink = strLinkView_PeopleRecord($lDonorID, 'View people record ' . str_pad($lDonorID, 5, '0', STR_PAD_LEFT), true) . ' '; } $strFontStyle = 'font-style:italic; color: #666;'; } else { $strLink = ''; $strFontStyle = ''; } if ($bBiz) { $strDonor = htmlspecialchars($clsGH->pe_strLName); } else { $strDonor = htmlspecialchars($clsGH->pe_strLName . ', ' . $clsGH->pe_strFName); } if ($clsGH->gi_bGIK) { $strGH = '<br><small>in-kind: ' . $clsGH->strGIK . '</small>'; } else { $strGH = ''; } if (is_null($lSponsorID)) { $strSponID = ' '; $strGiftLink = strLinkView_GiftsRecord($lGiftID, 'View gift record', true); } else { if (bAllowAccess('showSponsors')) { $strSponID = strLinkView_Sponsorship($lSponsorID, 'view sponsorship', true) . ' ' . str_pad($lSponsorID, 5, '0', STR_PAD_LEFT); } else { $strSponID = ' '; } $strGiftLink = strLinkView_SponsorPayment($lGiftID, 'View sponsorship payment record', true); } $strFlags = ''; if ($clsGH->bHon) { $strFlags .= ' H'; } if ($clsGH->bMem) { $strFlags .= ' M'; } $strFlags = trim($strFlags); if ($strFlags == '') { $strFlags = ' '; } $curTotal += $clsGH->gi_curAmnt; echoT(' <tr class="makeStripe"> <td class="enpRpt" style="' . $strFontStyle . ' text-align:center; width: 15pt;">' . $idx . ' </td> <td class="enpRpt" style="' . $strFontStyle . ' width: 50pt;">' . $strGiftLink . ' ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="text-align: right;' . $strFontStyle . ' width: 60pt;">' . number_format($clsGH->gi_curAmnt, 2) . ' </td> <td class="enpRpt" style="text-align: center;' . $strFontStyle . ' width: 60pt;">' . date($genumDateFormat, $clsGH->gi_dteDonation) . ' </td> <td class="enpRpt" style="' . $strFontStyle . ' width: 140pt;">' . $strLink . $strDonor . ' </td> <td class="enpRpt" style="' . $strFontStyle . ' width: 70pt;">' . htmlspecialchars($clsGH->ga_strAccount) . ' </td> <td class="enpRpt" style="' . $strFontStyle . ' width: 130pt;">' . htmlspecialchars($clsGH->gc_strCampaign) . $strGH . ' </td>'); if (bAllowAccess('showSponsors')) { echoT(' <td class="enpRpt" style="text-align: center;' . $strFontStyle . ' width: 50pt;">' . $strSponID . ' </td>'); } echoT(' <td class="enpRpt" style="text-align: center;' . $strFontStyle . ' width: 30pt;">' . $strFlags . ' </td> </tr>'); }
echoT('<br><i>There are no quailifying donations for this deposit.</i><br><br>'); } else { echoT(form_open('financials/deposits_add_edit/addC2Deposit/' . $lDepositID)); echoT('Select donations to add to this deposit report:<br>'); echoT(' <div id="scrollCB" style="height:170px; width:600px; overflow:auto; border: 1px solid black;">'); echoT(' <table class="enpRpt" style="width: 100%">'); foreach ($gifts as $gift) { $lGiftID = $gift->gi_lKeyID; echoT(' <tr> <td class="enpRpt" style="width: 10px; vertical-align:top;"> <input type="checkbox" name="chkGift[]" value="' . $lGiftID . '" checked> </td> <td class="enpRpt" style="vertical-align:top; text-align: center; width: 50px;">' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_GiftsRecord($lGiftID, 'View gift record', true) . ' </td> <td class="enpRpt" style="vertical-align:top; text-align: right; width: 50px;">' . number_format($gift->gi_curAmnt, 2) . ' </td> <td class="enpRpt" style="vertical-align:top; text-align: center; ">' . date($genumDateFormat, $gift->gi_dteDonation) . ' </td> <td class="enpRpt" style="vertical-align:top; ">' . $gift->strSafeNameLF . ' </td> <td class="enpRpt" style="vertical-align:top; width: 140px;">' . htmlspecialchars($gift->strPaymentType) . ' </td> </tr>'); } echoT(' </table></div><br> <input type="submit" name="cmdSubmit" value="Create Deposit" onclick="this.disabled=1; this.form.submit();"
function writeAuctionPackageTable($lAuctionID, &$auction, &$packages, $bDescriptions) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- echoT(' <table class="enpRpt">'); echoT(' <tr> <td class="enpRptLabel"> package ID </td> <td class="enpRptLabel"> </td> <td class="enpRptLabel"> </td> <td class="enpRptLabel"> Bid<br>Sheet </td> <td class="enpRptLabel"> Name </td> <td class="enpRptLabel" nowrap> # Items </td> <td class="enpRptLabel"> Est. Value </td> <td class="enpRptLabel"> Winner </td> <td class="enpRptLabel"> Winning Bid </td> <td class="enpRptLabel"> Fulfilled? </td> </tr>'); $curEstValueTot = $curWinBidTot = $curFullfillTot = 0.0; $lTotItems = 0; foreach ($packages as $package) { $lPackageID = $package->lKeyID; $lWinnerID = $package->lBidWinnerID; $lGiftID = $package->lGiftID; $curEstValueTot += $package->curEstValue; $lTotItems += $package->lNumItems; if (is_null($lWinnerID)) { $strWinner = 'n/a ' . strLink_SetPackageWinner($lPackageID, 'Set Winner', true); $strWinnerStyle = 'text-align: center;'; $strWinningBid = 'n/a'; $strWinningBidStyle = 'text-align: center;'; $strFulfilled = 'No'; $strFulfilledStyle = 'text-align: center;'; $strPeopleLink = ''; } else { $curWinBidTot += $package->curWinBidAmnt; $strWinner = $package->bidWinner->strLink . ' ' . $package->bidWinner->strSafeNameLF; $strWinnerStyle = ''; $strWinningBid = number_format($package->curWinBidAmnt, 2); $strWinningBidStyle = 'text-align: right;'; if (is_null($lGiftID)) { $strFulfilled = 'No' . strLink_SetPackageFulfill($lPackageID, 'Fulfill/receive payment', true); $strFulfilledStyle = 'text-align: center;'; } else { $strFulfilled = number_format($package->curActualGiftAmnt, 2) . ' ' . strLinkView_GiftsRecord($lGiftID, 'View gift record', true); $strFulfilledStyle = ''; $curFullfillTot += $package->curActualGiftAmnt; } } if (is_null($package->lBidSheetID)) { $strLinkPDF = 'n/a'; } else { $strLinkPDF = strLink_PDF_PackageBidSheet($package->lBidSheetID, $lPackageID, 'Create PDF Bid Sheet', true, ' target="_blank" '); } echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center;">' . str_pad($lPackageID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_AuctionPackageRecord($lPackageID, 'View auction package', true) . ' </td> <td class="enpRpt" style="text-align: center;">' . strLinkEdit_AuctionPackage($lAuctionID, $lPackageID, 'Edit package', true) . ' </td> <td class="enpRpt" style="text-align: center;">' . strLinkRem_AuctionPackage($lAuctionID, $lPackageID, 'Remove Package', true, true) . ' </td> <td class="enpRpt" style="text-align: center;">' . $strLinkPDF . ' </td> <td class="enpRpt">' . $package->strPackageSafeName . ' </td> <td class="enpRpt" style="text-align: center; padding-left: 7pt;" nowrap>' . number_format($package->lNumItems) . ' ' . strLinkView_AuctionItemsViaPID($lPackageID, 'View package items', true) . ' ' . strLinkAdd_AuctionItem($lPackageID, 'Add new item', true) . ' </td> <td class="enpRpt" style="text-align: right;">' . $auction->strCurrencySymbol . ' ' . number_format($package->curEstValue, 2) . ' </td> <td class="enpRpt" style="' . $strWinnerStyle . '">' . $strWinner . ' </td> <td class="enpRpt" style="' . $strWinningBidStyle . '">' . $strWinningBid . ' </td> <td class="enpRpt"style="' . $strFulfilledStyle . '">' . $strFulfilled . ' </td> </tr>'); } echoT(' <tr class="makeStripe"> <td class="enpRpt" colspan="5"> <b>Total:</b> </td> <td class="enpRpt" style="width: 40pt; text-align: center;"><b>' . number_format($lTotItems) . '</b> </td> <td class="enpRpt" style="width: 40pt; text-align: right;"><b>' . number_format($curEstValueTot, 2) . '</b> </td> <td class="enpRpt" > </td> <td class="enpRpt" style="width: 40pt; text-align: right;"><b>' . number_format($curWinBidTot, 2) . '</b> </td> <td class="enpRpt" style="width: 40pt; text-align: right;"><b>' . number_format($curFullfillTot, 2) . '</b> </td> </tr>'); echoT('</table><br><br>'); }
private function loadGiftContext() { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $this->clsGifts = new mdonations(); $lGiftID = $this->lForeignID; $this->clsGifts->loadGiftViaGID($lGiftID); $this->strContextLabel = 'donation record'; $this->strContextName = $this->clsGifts->gifts[0]->strFormattedAmnt . ' / ' . $this->clsGifts->gifts[0]->strSafeName; $this->strContextViewLink = strLinkView_GiftsRecord($lGiftID, 'View gift record', true); }
function contextNameLink($enumType, $lForeignID, &$strContextName, &$strContextLink) { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- $CI =& get_instance(); $strContextLink = str_pad($lForeignID, 5, '0', STR_PAD_LEFT); switch ($enumType) { case CENUM_CONTEXT_PEOPLE: $CI->clsPeople->loadPeopleViaPIDs($lForeignID, false, false); $strContextName = $CI->clsPeople->people[0]->strFName . ' ' . $CI->clsPeople->people[0]->strLName; $strContextLink .= strLinkView_PeopleRecord($lForeignID, 'View people record', true); break; case CENUM_CONTEXT_CLIENT: $CI->clsClients->loadClientsViaClientID($lForeignID); $strContextName = $CI->clsClients->clients[0]->strFName . ' ' . $CI->clsClients->clients[0]->strLName; $strContextLink .= strLinkView_ClientRecord($lForeignID, 'View client record', true); break; case CENUM_CONTEXT_GIFT: $CI->clsGifts->loadGiftViaGID($lForeignID); $strContextName = 'Donation by ' . $CI->clsGifts->gifts[0]->strSafeName; $strContextLink .= strLinkView_GiftsRecord($lForeignID, 'View gift record', true); break; case CENUM_CONTEXT_BIZ: $CI->clsBiz->loadBizRecsViaBID($lForeignID); $strContextName = $CI->clsBiz->bizRecs[0]->strSafeName; $strContextLink .= strLinkView_BizRecord($lForeignID, 'View business record', true); break; case CENUM_CONTEXT_SPONSORSHIP: $CI->clsSpon->sponsorInfoViaID($lForeignID); $strContextName = 'Sponsor ' . $CI->clsSpon->sponInfo[0]->strSponSafeNameFL; $strContextLink .= strLinkView_Sponsorship($lForeignID, 'View sponsorship record', true); break; case CENUM_CONTEXT_VOLUNTEER: $CI->clsVol->loadVolRecsViaVolID($lForeignID, true); $strContextName = $CI->clsVol->volRecs[0]->strSafeNameFL; $strContextLink .= strLinkView_Volunteer($lForeignID, 'View volunteer record', true); break; case CENUM_CONTEXT_LOCATION: $CI->clsLoc->loadLocationRec($lForeignID); $strContextName = $CI->clsLoc->strLocation; $strContextLink .= strLinkView_ClientLocation($lForeignID, 'View client location record', true); break; case CENUM_CONTEXT_ORGANIZATION: $CI->clsLoc->loadLocationRec($lForeignID); $strContextName = $CI->clsChapter->chapterRec->strSafeChapterName; $strContextLink .= strLinkView_OrganizationRecord($lForeignID, 'View your organization record', true); break; default: screamForHelp($enumType . ': feature not available yet<br>error on line ' . __LINE__ . ',<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__); break; } }
Amount </td> <td class="enpRptLabel"> Date </td> <td class="enpRptLabel"> Donor </td> </tr> '); $curTot = 0.0; foreach ($giftViaPay->gifts as $gift) { $lGiftID = $gift->gi_lKeyID; echoT(' <tr class="makeStripe"> <td class="enpRpt" style="text-align: center;">' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . ' ' . strLinkView_GiftsRecord($lGiftID, 'View gift record', true) . ' </td> <td class="enpRpt" style="text-align: center;">' . strLinkRem_DepositEntry($lGiftID, $lDepositID, 'Remove gift from deposit', true, true) . ' </td> <td class="enpRpt" style="text-align: right; width: 50pt;">' . number_format($gift->gi_curAmnt, 2) . ' </td> <td class="enpRpt" style="width: 80pt; text-align: center;">' . date($genumDateFormat, $gift->gi_dteDonation) . ' </td> <td class="enpRpt" style="width: 200pt;">' . $gift->strSafeNameLF . ' </td> </tr> '); $curTot += $gift->gi_curAmnt; } echoT(' <tr>
public function strDonationViewTable($sqlStr, $bIncludeAck, $bShowACO, $strTitle = '') { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $genumDateFormat; if ($bShowACO) { $clsACO = new madmin_aco(); } $query = $this->db->query($sqlStr); if ($query->num_rows() == 0) { return '<br><br><i>There are no donations that match your search criteria.</i>'; } else { $strOut = ' <table class="enpRptC" style="width: 100%;">' . $strTitle . ' <tr> <td class="enpRptLabel" style="width: 70px;"> giftID </td> <td class="enpRptLabel" style="width: 80px;"> Amount </td> <td class="enpRptLabel" style="width: 90px;"> Date </td> <td class="enpRptLabel" style="width: 200px;"> Donor </td> <td class="enpRptLabel" style="width: 110px;"> Account </td> <td class="enpRptLabel" style="width: 130px;"> Campaign </td> <td class="enpRptLabel" style="width: 90px;"> In-Kind? </td>'; if ($bIncludeAck) { $strOut .= ' <td class="enpRptLabel" style=""> Acknowledged? </td>'; } $strOut .= ' </tr>'; foreach ($query->result() as $row) { $lGiftID = $row->gi_lKeyID; $bBiz = $row->pe_bBiz; $bSpon = !is_null($row->gi_lSponsorID); $lPeopleID = $row->pe_lKeyID; if ($bShowACO) { $strFlagImg = ' ' . $clsACO->strFlagImage($row->aco_strFlag, $row->aco_strName); } else { $strFlagImg = ''; } if ($bIncludeAck) { if ($row->gi_bAck) { $strAlignAck = 'left'; $strAck = 'Yes - ' . date($genumDateFormat, dteMySQLDate2Unix($row->gi_dteAck)) . ' by ' . htmlspecialchars($row->us_strFirstName . ' ' . $row->us_strLastName); } else { $strAlignAck = 'center'; $strAck = '-'; } } if ($bSpon) { $strLinkViewRec = strLinkView_SponsorPayment($lGiftID, 'View sponsorship payment record', true); $sponLink = ' ' . strLinkView_Sponsorship($row->gi_lSponsorID, 'View sponsorship', true); } else { $strLinkViewRec = strLinkView_GiftsRecord($lGiftID, 'View gift record', true); $sponLink = ''; } if ($row->gi_bGIK) { $strAlign = 'left'; $strGIK = htmlspecialchars($row->strGIK); } else { $strAlign = 'center'; $strGIK = '-'; } if ($bBiz) { $strName = htmlspecialchars($row->pe_strLName); $strLink = strLinkView_BizRecord($lPeopleID, 'View business/organization record', true); } else { $strName = htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName); $strLink = strLinkView_PeopleRecord($lPeopleID, 'View people record', true); } $strOut .= ' <tr class="makeStripe"> <td class="enpRpt" style="width: 50px; text-align: center;">' . $strLinkViewRec . ' ' . str_pad($lGiftID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="width: 60px; text-align: right; padding-right: 5px;">' . number_format($row->gi_curAmnt, 2) . $strFlagImg . ' </td> <td class="enpRpt" style="text-align: left;">' . date($genumDateFormat, dteMySQLDate2Unix($row->gi_dteDonation)) . ' </td> <td class="enpRpt" style="text-align: left;">' . $strLink . str_pad($lPeopleID, 5, '0', STR_PAD_LEFT) . ' ' . $strName . ' </td> <td class="enpRpt" style="text-align: left;">' . htmlspecialchars($row->ga_strAccount) . ' </td> <td class="enpRpt" style="text-align: left;">' . htmlspecialchars($row->gc_strCampaign) . $sponLink . ' </td> <td class="enpRpt" style="text-align: ' . $strAlign . ';">' . $strGIK . ' </td>'; if ($bIncludeAck) { $strOut .= ' <td class="enpRpt" style="text-align: ' . $strAlignAck . ';">' . $strAck . ' </td>'; } $strOut .= ' </tr>'; } $strOut .= '</table>' . "\n"; return $strOut; } }
public function strHTMLOneLineLink($clsSingleRem) { /*--------------------------------------------------------------------- sample call: $clsRem->loadReminders(); if ($clsRem->lNumReminders > 0){ foreach ($clsRem->reminders as $clsSingleRem){ $strRemLink = $clsRem->strHTMLOneLineLink($clsSingleRem); } } ---------------------------------------------------------------------*/ global $genumDateFormat; $enumRemType = $clsSingleRem->enumSource; $lFID = $clsSingleRem->lForeignID; switch ($enumRemType) { case CENUM_CONTEXT_PEOPLE: $people = new mpeople(); $people->lPeopleID = $lFID; $people->peopleInfoLight(); $strRemLink = 'people reminder for ' . $people->strSafeName . strLinkView_PeopleRecord($lFID, 'View people record', true); break; case CENUM_CONTEXT_BIZ: $clsBiz = new mbiz(); $clsBiz->lBID = $lFID; $clsBiz->bizInfoLight(); $strRemLink = 'business reminder for ' . $clsBiz->strSafeName . strLinkView_BizRecord($lFID, 'View business record', true); break; case CENUM_CONTEXT_CLIENT: $clsClient = new mclients(); $clsClient->loadClientsViaClientID($lFID); $strRemLink = 'client reminder for ' . $clsClient->clients[0]->strSafeName . ' ' . strLinkView_ClientRecord($lFID, 'View client record', true); break; case CENUM_CONTEXT_GIFT: $clsGifts = new mdonations(); $clsGifts->loadGiftViaGID($lFID); $gift = $clsGifts->gifts[0]; $strRemLink = 'gift reminder for ' . $gift->strACOCurSymbol . number_format($gift->gi_curAmnt, 2) . ' ' . $gift->strSafeName . ' of ' . date($genumDateFormat, $gift->gi_dteDonation) . ' ' . strLinkView_GiftsRecord($lFID, 'View gift record', true); break; case CENUM_CONTEXT_USER: $clsUser = new muser_accts(); $clsUser->loadSingleUserRecord($lFID); $user =& $clsUser->userRec[0]; $strRemLink = 'user reminder for ' . $user->strSafeName . ' ' . strLinkView_User($lFID, 'View user record', true); break; case CENUM_CONTEXT_SPONSORSHIP: $cSpon = new msponsorship(); $cSpon->sponsorInfoViaID($lFID); $strRemLink = 'sponsorship reminder for sponsor ' . $cSpon->sponInfo[0]->strSponSafeNameFL . ' ' . strLinkView_Sponsorship($lFID, 'View sponsorship record', true); break; case CENUM_CONTEXT_LOCATION: case CENUM_CONTEXT_VOLUNTEER: default: screamForHelp($enumRemType . ': Switch type not implemented</b><br>error on <b>line:</b> ' . __LINE__ . '<br><b>file:</b> ' . __FILE__ . '<br><b>function:</b> ' . __FUNCTION__); break; } return $strRemLink; }